Optical Sensing System

ABSTRACT

An optical sensing system for detecting objects passing through a volume of interest, wherein the sensing system has an emitter and a detector. The detector detects motion of object shadows generated as the object passes through the volume of interest between the emitter and detector. Motion detection algorithms, using computed motion vectors of the detected object, logically determine whether an object has traveled completely through the detection space, and can be used to discriminate a specific outcomes and/or impediments.

A particularly difficult situation is presented when some of the products to be dispensed are large so that a large transverse cross-sectional area is required for the vend space, but others of the products are so small that an optical beam meant to be broken by the product could be missed due to random path of movement and changing spatial orientation of the falling product being vended.

There is therefore a need for an improved sensing system which overcomes these and other deficiencies in the prior art.

SUMMARY

Accordingly, it is an object of this invention to provide an optical sensing system which detects an object as it passes through a volume of interest.

It is another object of this invention to provide an optical sensing system which detects objects ranging from small to large orientation and dimensional ratios.

It is another object of this invention to provide an optical sensing system which is robust against external light sources and against intentional attempts to disrupt the detection system.

In one embodiment, the optical sensing system of the present invention is comprised of a light beam produced by an emitter and detected by a detector assembly, which may be a mosaic detector. The light beam may be collimated by the emitter or it may be collimated by a lens assembly spaced a certain distance from the emitter. In one embodiment, the optical sensor system uses a light source that is quasi-monochromatic and detectors that have peak sensitivity near the frequency of the light source, which helps filter out any ambient light that is not at that frequency. One embodiment includes a filter which passes only the narrow wavelength of the light source, thereby substantially rejecting ambient interfering light, such as may pass through a glass front vending machine, that may otherwise block or confuse the optical sensors. Lenses may be used to help remove ambient light that does not travel along the optical axis of the collimated light by directing it off axis so that it does not get focused on the detector. The optical sensing system of the present invention eliminates the problem of previous systems that require elaborate techniques to remove interference from ambient light and require extensive calibration to ensure that objects are detected.

For ensuring that a vending machine dispense cycle will continue until a product has descended through a volume of interest or an established time interval has elapsed, an optical beam produced by an emitter is established across the volume of interest through which a product must drop. The volume of interest in vending applications is referred to as the vending space. The beam may be projected across the vending space in either a vertical or horizontal direction, or a combination thereof. The beam has a first end and a second end where the first end is adjacent to the emitter and the second end is adjacent to the detector. Preferably, the beam is a tightly collimated light source, typically generated by a laser or light emitting diode (LED). If the light source is not collimated at the time of emission, one or more optical lenses may be used to collimate the light before it travels across the vending space. The beam may be any geometrical shape, including round. In one embodiment, the cross-section of the beam may be set (expanded) to fill the desired vending space according to the optics design. At the second end of the collimated light beam (e.g. the end opposite the emitter), an optical lens system focuses the collimated beam into a detector, which may be a mosaic detector such as a video motion sensor. The collimated beam allows reliable detection of very small objects because the relatively high number of individual photons that constitute the collimated light beam. The beam travels in a straight line (the optical axis) and is less susceptible to diffusion relative to non-collimated beams. The optical design of the collimating lenses sends the beam of light to the collecting lens system for the detector in such a manner that ambient light does not align with the optical axis of the direction of the beam of light and is not focused on the detector, because it is off axis. As described in more detail below, during operation a portion of the collimated beam is blocked by an intervening vended object passing through the vending space to produce a distinct shadow at the detector relative to the normal intensity of the light beam reaching the detector.

In addition to detecting the presence or absence of an object in the vend space, in some embodiments the detector can also detect the motion of dispensed object shadows generated as the dispensed object passes downward through the vending space. Detection of shadows (as opposed to front surface images) eliminates the need to process wide variations in color and reflectivity of the dispensed product. Motion detection algorithms, using computed motion vectors of the dispensed product, logically determine that a dispensed product has traveled completely through or has stalled within the vending space, and can be used to discriminate a specific vending cycle outcome and/or impediments. As described below, the detection algorithms may be set to detect items moving in a certain direction, at a certain speed or range of speeds, or items of a certain size or range of sizes.

In some embodiments, the detector is programmed with a set of rules to determine the range of motion vectors which the user has predefined as a successful vending cycle, thereby causing a logical output to be issued indicating to the vending machine that a successful dispensing action has occurred. In some embodiments a rule may be created which defines a successful vending cycle only if a shadow is detected in the downward direction moving at a predetermined velocity. Motion detection algorithms may be modified to allow the predetermined velocity, size, and direction characteristics to be tailored to user preferences for the properties of the vend object(s). In some embodiments the user may also define one or more separate sets of rules that define a static blockage of product (shadow with no motion), an attempt to enter the machine from the vending access opening in a theft attempt (shadow moving in the wrong direction), or other criteria as needed by the end use of the system. In some embodiments a rule may be created which instructs the machine to take no action if a stationary shadow having a predetermined size is detected.

In another embodiment, a system of one or more reflecting mirrors is interposed between the emitter and the detector for the purpose of reflecting the beam back and forth across the vending space any desired number of times to further illuminate the vending space by the multiple beam passes, with the intent of minimizing gaps between beam passes through which an object may pass undetected. This embodiment operates identically to the first embodiment, but allows use of a smaller cross-section optical lens system to cover the vending volume by employing multiple parallel collimated light beams rather than a single large diameter collimated beam.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the invention are described in more detail with reference to the attached drawings, in which:

FIG. 1 is a block diagram showing an embodiment of the invention.

FIG. 2 is a side view of the block diagram shown in FIG. 1.

FIG. 3 is a front view of a vending machine showing any embodiment of the sensing system wherein the emitter and detector are located above the volume of interest.

FIG. 4 is a front view of a vending machine showing any embodiment of the sensing system wherein the beam is reflected off of a mirror thereby providing the emitter and detector are on the same side of the machine.

FIG. 5 is a top view of an embodiment of the sensing system wherein multiple autonomous emitter and detector pairs create multiple beams traversing the volume of interest.

FIG. 6 is a top view of an embodiment of the sensing system wherein a folding mirror is used to increase the volume of interest covered with a single emitter source and single detector.

FIG. 7 is a top view of an embodiment of the sensing system wherein multiple folding mirrors are used to increase the volume of interest coverage with a single emitter source and single detector.

FIG. 8 is a front view of a vending machine showing an embodiment of the sensing system wherein the beam(s) is (are) oriented vertically to detect a vertical vending space.

FIG. 9 is a perspective view of a mosaic detector showing the plurality of detection elements.

DETAILED DESCRIPTION

The present invention is related to an optical sensing system for use in any suitable application, including for sensing objects dispensed from a vending machine. The invention is equally applicable to any suitable vending machine having a volume of interest 16 (vend space) through which an object 26 must pass, independent of the specific electromechanical design and construction of the vending machine.

One embodiment of the optical sensing system is schematically and diagrammatically illustrated in FIG. 1 in which an emitter 10 projects a beam 14 of electromagnetic radiation (light) to a detector 12. As illustrated below with reference to some specific embodiments, the beam 14 may be oriented in any suitable direction within the volume of interest 16. For example, the beam 14 may be projected in one or more of front/back, left/right, up/down, or any angle therebetween. As shown in FIG. 8, for example, it is not necessary for the beam 14 to be projected at a right angle to the direction of travel of the vended object 26 as long as the vended object 26 is capable of breaking the beam 14 as it is being vended. The beam 14 has a first end adjacent to the emitter 10 and a second end adjacent to the detector 12. In FIG. 1, the emitter 10 and detector 12 are adapted to be combined with opposite interior sides of the volume of interest 16. The emitter 10 projects a single light source such as beam 14 and the detector 12 is adapted to detect the beam 14 and may be a single video sensor or mosaic detector. The beam 14 cross-section and orientation are selected to substantially span the volume of interest 16 for the product 26 to be dispensed. The arrow A in FIGS. 1 and 2 shows the direction of travel of the product 26 being dispensed.

Any suitable emitter 10 may be used, including a laser diode, light emitting diode (“LED”), gas laser, incandescent light, fluorescent light, and high pressure gas discharge light. Power for the emitter 10 is typically provided from a conventional external power source, but may be integrated into the emitter 10 in some embodiments (such as battery power). In embodiments using a laser diode as the emitter, the laser diode power required for a typical vending machine application is typically five milliwatts or less, well below safety thresholds even without beam expansion. The intensity of the light generated by the emitter 10 is proportional to the distance the light must travel from the emitter 10 to the detector 12. If desired, the emitter 10/detector 12 system may be switched on by the vending machine master controller only when a vend cycle is in progress in order to conserve power when not in use.

In one embodiment the wavelength of the beam 14 created by the emitter 10 may be selected by the user according to the choice of detector 12 or the ambient interfering light characteristics so as to optimize system performance. In areas where significant amounts of ambient light will reach the detector 12, it may be desirable to select or limit the wavelength of light coming from the emitter 10 then tune the detector 12 to only detect the selected wavelength. This allows the system to tune out all wavelengths of ambient light except the one(s) selected by the user. This eliminates the need for calibration and synchronization functions which are required in prior art device. Red light (635 nm) is used in one embodiment One embodiment includes a filter which passes only the wavelength of the emitted beam 14, thereby substantially rejecting ambient interfering light from reaching the detector 12.

In the embodiment shown in FIG. 1, a lens assembly is used to increase the diameter of the beam 14, then collimate the expanded beam 14, then refocus the beam 14 as it enters the detector 12. The lens assembly includes one or more of a first lens 18 which may be an expanding lens for expanding the beam 14 to an expanded diameter. A second lens 22 which may be a collimating lens for collimating the expanded beam to create a beam of light 14 comprised of generally parallel light rays of the desired final diameter. Typically the first two lenses 18, 22 are positioned near the first end of the beam 14 (near the emitter 10). A third lens 23 which may be a decollimating or first focusing lens for focusing the incoming collimated beam 14 to an intermediate diameter. A fourth lens 20 which may be a secondary focusing lens for focusing the intermediate beam 14 to a smaller size commensurate with the design of the specific detector 12. The focused light is applied to the optical port of the detector 12 for analysis by the processor 21. Typically the second two lenses 23, 20 are positioned near the second end of the beam 14 (near the detector 12).

In addition to expanding the diameter of the beam 14 and collimating the beam 14 through the volume of interest 16, the lens assembly also serves to help prevent ambient light from reaching the detector 12 and interfering with detection. Ambient light which does not pass through one or more of lenses 22 and 23 at a specific angle (i.e., the angle of the light coming from the emitter 10) is directed by the lens 22, 23 off-axis to a focal point away from the detector 12.

One or more of the emitter 10, detector 12, and lens assembly components may be mounted in one or more housings to help secure the components in their proper locations.

In one embodiment, the detector 12 is a subsystem comprising a mosaic of photo detectors 11, a video processing means, motion algorithms, and rule programming. The mosaic of photo detectors 11 may have a defined array size and may be a video camera pixel array. An exemplary mosaic detector is shown in FIG. 9 wherein the detector 12 comprises a plurality of detection elements 11. Each detection element 11 is able to independently determine relative light levels such that full or partial shadows (relative to the normal intensity of the beam 14) cast on the detection elements 11 can be detected. Thus, motion, velocity, and size can be detected by the subsystem as an object 26 passes in front of the detection elements 11 as each individual detection element 11 sees changes in light levels. The mosaic sensor array provides better detection of objects passing through the beam of light 14 from the source, because it has a better signal to noise ratio compared to a linear array which has a better signal to noise ratio compared to a single detector. The mosaic sensor array can identify the direction an object is traveling as it passes through the beam 14 which the single detector and the linear array are not able to do. The one exception for the linear array is the special case for an object that is traveling parallel to the direction of the linear array.

The detector subsystem is typically integrated into a single, small circuit, which may include or otherwise be in communication with a processor 21 and firmware 23. The subsystem can determine direction, position, velocity, and acceleration of objects passing in front of the array of detection elements 11. The subsystem allows direct programming of rules (using various internally determined parameters, i.e., delta-x, delta-y, x-acceleration, y-acceleration, smoothing, x-velocity, y-velocity, etc.) into the device to define under what conditions a logical output state may be defined and so indicated. Such detector subsystem may include a processing function, typically expressed as N×M pixels (of the detection element 11 array), which output is used by the motion detection algorithms to extract the internal motion parameters. The video processing means is typically implemented in firmware 23 and/or in a processor (microcomputer) 21 to perform mathematical operations on the data values detected by the detection element 11 array. This allows the device to compare complex manipulations, apply mathematical functions, and compare matrix values with matrix values from a previous time of pixel light levels. The video processing compares patterns of light levels between frames, and makes decisions and inferences about the differences based on the rules and motion algorithms.

Some embodiments include methods of using the optical sensing system wherein one or more rules are created to define a successful vending cycle. Sensing of a product drop through the beam 14 involves comparing the vectors of any detected shadows reported by the motion detection algorithms of the detector 12. The motion detection algorithms are typically implemented in firmware 23 and/or in a processor (microcomputer) 21. If the reported vectors meet the requirements of the predefined rules, a dispense action logical signal is provided to the vending machine master controller. Further actions may be undertaken by the vending machine based upon this signal.

In one embodiment, a successful vending cycle is only achieved if a shadow is detected in the downward direction and/or is moving at a predetermined velocity. Motion detection algorithms may be modified to create rules which allow the predetermined velocity, size, and direction characteristics to be tailored to user preferences, or to specifically match each of a plurality of vended objects. In some embodiments the user may also define one or more separate sets of rules that define a static blockage of product (shadow with no motion), an attempt to enter the machine from the vending access opening in a theft attempt (shadow moving in the wrong direction), or other criteria as needed by the end use of the system. In some embodiments a rule may be created which instructs the machine to take no action if a stationary shadow having a predetermined size is detected.

The motion detection algorithms may vary widely depending on the speed of motion desired for detection. A first step is to determine the light level on all pixels in the detection element array 11 and to store those values in the processor's 21 buffer memory. Then the light level is determined again for all pixels in the array 11 a algorithms examine and make decisions based on the relative differences among the pixels of the array 11 generated by the impinging shadow.

The smallest dispensed product detectable by the invention is one pixel area divided by the number of levels of gray scale. For example, if sixty-four levels of gray scale exist, then an object shadow 1/64th of the pixel area will cause a one-step light level output change detectable by the detector 12.

A number of embodiments are possible to accommodate various volume of interest 16 geometries and physical vending machine implementations. FIGS. 1, 3, 5, and 7 show an embodiment wherein the emitter 10 is positioned at a first end of the volume of interest 16 such that the resulting collimated light beam 14 is directed across the desired axis/area of the volume of interest 16 to the detector 12 at a second end of the volume of interest 16 where the detector 12 monitors for dispensed products 26 falling from a tray assembly 32 within the vending machine. During normal operation, the dispensed products 26 fall into a bin 24 for retrieval by the consumer. In other words, in these embodiments, the first end of the beam 14 is projected from the first side of the volume of interest 16 and the second end of the beam 14 is received by a detector 12 at the opposite side of the volume of interest 16. In contrast, FIGS. 4 and 6 show embodiments where the beam 14 is reflected back to the first side of the volume of interest 16 by a mirror to allow the emitter 10 and detector 12 to be located on the same side of the volume of interest 16.

FIG. 3 shows an embodiment wherein the emitter 10 and detector 12 are used with right angle mirrors 30 in order to conserve width within a vending machine. In the embodiment shown, the emitter 10 and detector 12 may be located above the volume of interest 16 while the beam 14 is projected horizontally across the volume of interest 16 using mirrors 30.

FIG. 4 shows an embodiment using a mirror 31 to reflect a single beam 14 back to the detector 12 located on the same side as the emitter 10. This embodiment allows a single beam 14 to traverse the volume of interest 16 twice thereby increasing the detection area covered by the single beam 14.

FIG. 5 is a top view showing an embodiment using multiple emitter 10 a, 10 b, 10 c/detector 12 a, 12 b, 12 c pairs with each beam 14 traversing a different area of volume of interest 16. It will be understood that any suitable number of emitter 10/detector 12 pairs may be used. Each emitter 10 a, 10 b, 10 c/detector 12 a, 12 b, 12 c operates autonomously to provide independent information to the processor 21. The logical outputs can be logically combined in a desired manner or used separately so as to divide the volume of interest 16 into sectors. This embodiment may be used when it is important to know which sector of the volume of interest 16 a product has passed through.

FIG. 6 is a top view showing an embodiment wherein a folding mirror 35 (corner reflector) is used to double the monitored vending space 16 using only a single emitter 10 and detector 12 pair. It is irrelevant to the operation of the vending machine in which pixel(s) motion is detected, just that motion was detected somewhere. In this embodiment the emitter 10 and detector 12 are located on the same side of the vending space 16.

FIG. 7 is a top view of an embodiment wherein multiple folding mirrors 35 to monitor a larger vend space with only a single emitter 10/detector 12 pair. This expands the embodiment of FIG. 6 with additional folds of the beam 14. Additional numbers of mirrors 35 may be used to further fold the beam 14 to increase the detection area of the vending space 16. The number of folds that can be applied is limited only by the source brightness, mirror reflectivity, and tightness of collimation (beam divergence). Further, the gap between the beam 14 as it passes back and forth across the vending space 16 may be adjusted to user preference. In one embodiment, the mirrors 35 can be adjusted such that there is little or no gap between the reflected beam 14.

FIG. 8 shows an embodiment wherein the beams 14 traverse the volume of interest 16 in a vertical direction. In the embodiment shown, a plurality of emitters 10 are positioned near the top (first end) of the machine and a plurality of corresponding detectors 12 are positioned near the bottom (second end) of the machine such that the emitters 10 create a vertical beam 14 through the volume of interest 16 which are received by the detectors 12. In other embodiments the components may be reversed such that the detectors 12 may be near the top and the emitters 10 near the bottom. This embodiment is beneficial if it is important to know which column of products has been vended. In still other embodiments mirrors may be used to reflect a single beam 14 in generally parallel vertical alignment (similar to FIG. 7 if it were rotated ninety degrees) to sense products vended from different trays.

Having thus described the invention in connection with the preferred embodiments thereof, it will be evident to those skilled in the art that various revisions can be made to the preferred embodiments described herein without departing from the spirit and scope of the invention. It is our intention, however, that all such revisions and modifications that are evident to those skilled in the art will be included with in the scope of the following claims. 

What is claimed is as follows:
 1. A method of detecting an object passing through a volume of interest in a first direction using an optical sensing system, said method comprising: activating an emitter to generate electromagnetic radiation that substantially spans said volume of interest and has an intensity and a diameter; expanding the diameter of the electromagnetic radiation by directing the light beam through a lens assembly to create an expanded light beam; collimating the expanded light beam by directing the expanded light beam through the lens assembly to create a collimated light beam; focusing the collimated light beam at a mosaic detector having a plurality of light detecting elements; detecting shadows falling on each of the light detecting elements caused by the object passing through said volume of interest; programming a processor with motion detection algorithms to determine whether the detected shadows meet a certain pattern.
 2. The method of claim 1 wherein the certain pattern is a stationary shadow detected on one or more of the light detecting elements.
 3. The method of claim 1 wherein the certain pattern is a shadow moving in the first direction.
 4. The method of claim 1 wherein the certain pattern is a shadow moving in a second direction.
 5. The method of claim 1 wherein the certain pattern is a shadow having a predetermined size.
 6. The method of claim 1 wherein the emitter is a light emitting diode.
 7. The method of claim 1 wherein the emitter is a laser.
 8. A method of detecting an object passing through a volume of interest in a first direction using an optical sensing system, said method comprising: activating an emitter to generate electromagnetic radiation having a predetermined wavelength that substantially spans said volume of interest and has an intensity and a diameter; expanding the diameter of the electromagnetic radiation by directing the light beam through a lens assembly to create an expanded light beam; collimating the expanded light beam by directing the expanded light beam through the lens assembly to create a collimated light beam; focusing the collimated light beam at a mosaic detector having a plurality of light detecting elements; detecting shadows falling on each of the light detecting elements caused by the object passing through said volume of interest; programming a processor with motion detection algorithms to determine whether the detected shadows meet a certain pattern.
 9. The method of claim 8 further comprising tuning the detector to have a peak sensitivity at the wavelength of the emitted light.
 10. A method of detecting an object passing through a volume of interest in a first direction using an optical sensing system, said method comprising: activating an emitter to generate electromagnetic radiation that substantially spans said volume of interest and has an intensity and a diameter; expanding the diameter of the electromagnetic radiation by directing the light beam through a lens assembly to create an expanded light beam; collimating the expanded light beam by directing the expanded light beam through the lens assembly to create a collimated light beam; focusing the collimated light beam at a mosaic detector having a plurality of light detecting elements; detecting shadows falling on each of the light detecting elements caused by the object passing through said volume of interest; programming a processor with motion detection algorithms to determine whether the detected shadows meet a certain pattern; wherein the light beam travels along an optical axis and the lens assembly is shaped to focus light which is not traveling along the optical axis away from the mosaic detector. 